package ControlLayer;
import java.util.ArrayList;
import ModelLayer.*;


public class LoanCtr
{
    private Loan loan;
    private AddressBook adBook;

  
    public LoanCtr()
    {adBook=new AddressBook();
     loan = new Loan();
        
    }
    public void borrowDVD(int serialNumber,int id,String borrowDate,String period,String name)
    {loan.createLoan(serialNumber,id,borrowDate,period);
     adBook.find(name).addLoan(loan.createLoan(serialNumber,id,borrowDate,period));
     }
    public void returnDVD(int serialNumber)
    {loan.returnLoan(serialNumber);}
}
